import {debounce} from './utils.js'
import back from 'components/common/backTop/backTop.vue'

export let itemLitsenerMixin={
  mounted(){
    let refresh=debounce(this.$refs.scroll.refresh,100)
    this.$bus.$on('imgLoadOver',()=>{refresh()})
  }
}
export let backTopMixin={
  data(){
    return {
      backShow:false
    }
  },
  methods:{
    backTop(){
      this.$refs.scroll.scrollTo(0,0,1000)
    },
    listenBackShow(position){
      this.backShow=-position.y>1000
    }
  },
   components:{
     back
   }
}
